/***************************************************************************
 *   Copyleft 2008-2009 by												   *
 *	 Iwanicki Krzysztof													   *
 *   <gamma.mini.pw.edu.pl/~iwanickik>									   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 ***************************************************************************/
#ifndef __VGLAPI_H__
#define __VGLAPI_H__

#include "./vApi.h"
#include "./vGlExtensionManager.h"
#include "../../Macros/vMemoryMacros.h"


namespace Vendetta {
	/**
	* OpenGL based API class.
	* @see vApi
	*/
	class vGlApi: public vApi {
		friend class vEngine3D;
	public:

		virtual vVoid Update();

		//virtual vVoid* NewObject(const vInt objectmName);

	protected:
		/**
		* Default constructor.
		*/
		vGlApi();

		/**
		* Default destructor.
		*/
		virtual ~vGlApi();

		virtual vBool init();
		
		virtual vVoid kill();

		vVoid handleErrors();
		
		vVoid readColorBuffer(vUInt8* pixels) const;

		/// Manages OpenGL extensions
		vGlExtensionManager* mpGlExtensionManager;

	};
}

#endif //__VGLAPI_H__